<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="vue.js"></script>
    <script src="vue-resource.min.js"></script>
    <title>Title</title>
</head>
<style>
    [v-cloak]{
        display:none;
    }
</style>
<body>
<div id="box" v-cloak>
    {{msg}}
</div>
</body>
<script>
    var app = new Vue({
        el: '#box',
        data: {
            msg:'dasda',
        },
        beforeCreate:function(){
          console.log('beforeCreate');
        },
        created:function () {
            console.log('create');
        },
        beforeCompile:function () {
           alert('编译前');
        },
        ready: function () {
            alert('插入到文档中');
        },
        beforeDestroy:function () {
           alert('销毁前');
        },
        destroyed:function () {
            alert('销毁后');
        }
    });
</script>
</html>
